Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correctly restore type-only import/export names #337

Merged
merged 10 commits into from
Feb 28, 2025

Conversation

kricsleo
Copy link
Contributor

@kricsleo kricsleo commented Feb 25, 2025

resolves #311

This is a rework of PR: #333 🫡

  • Address more edge cases (see the added testcase)
  • Using AssignmentExpression to record the type-only hints (Instead of renaming import/export variables previously, since it's unstable and has some minor flaws.)
  • Merge ExportFixer into TypeOnlyFixer since it's now part of TypeOnlyFixer's responsibilities
  • Separate type-only and value import/export statements
  • Make the type-only fix easier to understand and maintian

@kricsleo kricsleo marked this pull request as draft February 25, 2025 10:27
@kricsleo kricsleo marked this pull request as ready for review February 28, 2025 17:03
@kricsleo
Copy link
Contributor Author

I’ve got to say, it’s been really tough for me trying to figure out how to implement this feature 🥲🥲

Hope to hear your feedback ❤️

@Swatinem
Copy link
Owner

To be quite honest, I haven’t really been maintaining this project for years, so I’m not that familiar with the code anymore myself to be of much help here.

But I do trust the testsuite quite a bit, and the results look good to me.

@Swatinem Swatinem merged commit ed7563a into Swatinem:master Feb 28, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

type only exports of classes are not respected
2 participants